# -*- coding: utf-8 -*-
"""
APP ENGINE Proxy
"""

######################
#only GAE' handle
######################

from google.appengine.api import urlfetch
from google.appengine.ext import db

#from HttpClient import HttpRsp
from taobaoApi import HttpRsp

class ApiConfig(db.Model):
	"定义一个数据模型类"
	appkey = db.StringProperty()
	secret = db.StringProperty()
	url = db.StringProperty()
	v = db.StringProperty()
	created = db.DateTimeProperty(auto_now_add=True)

class AEHttp():
	"获取http响应"
	def get(self, url):
		result = urlfetch.fetch(url)
#		reference:http://code.google.com/intl/zh-CN/appengine/docs/python/urlfetch/responseobjects.html
		rsp = HttpRsp(result.status_code, result.headers, result.content)
		return rsp

def main():
	print 'aa'

if __name__ == "__main__":
	main()